$\mathit{RO}_\mathit{run}$ & {\tt uuid} & string & unique identifier/object reference \\
$\mathit{RW}$ & {\tt name/label} & string & a human-readable name \\
$\mathit{RW}$ & {\tt name/description} & string & a notes field containg human-readable description \\
-$\mathit{RW}$ & {\tt SR} & SR ref & storage repository in which the VDI resides \\
+$\mathit{RO}_\mathit{ins}$ & {\tt SR} & SR ref & storage repository in which the VDI resides \\
$\mathit{RO}_\mathit{run}$ & {\tt VBDs} & (VBD ref) Set & list of vbds that refer to this disk \\
$\mathit{RO}_\mathit{run}$ & {\tt crash\_dumps} & (crashdump ref) Set & list of crash dumps that refer to this disk \\
$\mathit{RW}$ & {\tt virtual\_size} & int & size of disk as presented to the guest (in bytes). Note that, depending on storage backend type, requested size may not be respected exactly \\
value of the field
-\vspace{0.3cm}
-\vspace{0.3cm}
-\vspace{0.3cm}
-\subsubsection{RPC name:~set\_SR}
-
-{\bf Overview:}
-Set the SR field of the given VDI.
-
- \noindent {\bf Signature:}
-\begin{verbatim} void set_SR (session_id s, VDI ref self, SR ref value)\end{verbatim}
-
-
-\noindent{\bf Arguments:}
-
-
-\vspace{0.3cm}
-\begin{tabular}{|c|c|p{7cm}|}
- \hline
-{\bf type} & {\bf name} & {\bf description} \\ \hline
-{\tt VDI ref } & self & reference to the object \\ \hline
-
-{\tt SR ref } & value & New value to set \\ \hline
-
-\end{tabular}
-
-\vspace{0.3cm}
-
- \noindent {\bf Return Type:}
-{\tt
-void
-}
-
-
-
\vspace{0.3cm}
\vspace{0.3cm}
\vspace{0.3cm}
xen_vdi_set_name_description(xen_session *session, xen_vdi vdi, char *description);
-/**
- * Set the SR field of the given VDI.
- */
-extern bool
-xen_vdi_set_sr(xen_session *session, xen_vdi vdi, xen_sr sr);
-
-
/**
* Set the virtual_size field of the given VDI.
*/
}
-bool
-xen_vdi_set_sr(xen_session *session, xen_vdi vdi, xen_sr sr)
-{
- abstract_value param_values[] =
- {
- { .type = &abstract_type_string,
- .u.string_val = vdi },
- { .type = &abstract_type_string,
- .u.string_val = sr }
- };
-
- xen_call_(session, "VDI.set_SR", param_values, 2, NULL, NULL);
- return session->ok;
-}
-
-
bool
xen_vdi_set_virtual_size(xen_session *session, xen_vdi vdi, int64_t virtual_size)
{
# Xen API: Class VDI
# ----------------------------------------------------------------
- VDI_attr_ro = ['VBDs',
+ VDI_attr_ro = ['SR',
+ 'VBDs',
'physical_utilisation',
'sector_size',
'type']
VDI_attr_rw = ['name_label',
'name_description',
- 'SR',
'virtual_size',
'sharable',
'read_only']
self._get_VDI(vdi_ref).name_description = value
return xen_api_success_void()
- def VDI_set_SR(self, session, vdi_ref, value):
- return xen_api_error(XEND_ERROR_UNSUPPORTED)
-
def VDI_set_virtual_size(self, session, vdi_ref, value):
return xen_api_error(XEND_ERROR_UNSUPPORTED)